import { BaseRes, post } from "../libs/request";

const PREFIX = "/api/file";

interface Upload extends BaseRes {
  url: string;
}

export async function upload(file: FormData) {
  const res = await post<Upload>(PREFIX + "/upload", file);
  return res.data;
}
